Verifying Multi-threaded C Programs with SPIN
نویسندگان
چکیده
A key challenge in model checking software is the difficulty of verifying properties of implementation code, as opposed to checking an abstract algorithmic description. We describe a tool for verifying multithreaded C programs that uses the SPIN model checker. Our tool works by compiling a multi-threaded C program into a typed bytecode format, and then using a virtual machine that interprets the bytecode and computes new program states under the direction of SPIN. Our virtual machine is compatible with most of SPIN’s search options and optimization flags, such as bitstate hashing and multi-core checking. It provides support for dynamic memory allocation (the malloc and free family of functions), and for the pthread library, which provides primitives often used by multi-threaded C programs. A feature of our approach is that it can check code after compiler optimizations, which can sometimes introduce race conditions. We describe how our tool addresses the state space explosion problem by allowing users to define data abstraction functions and to constrain the number of allowed context switches. We also describe a reduction method that reduces context switches using dynamic knowledge computed on-the-fly, while being sound for both safety and liveness properties. Finally, we present initial experimental results with our tool on some small examples.
منابع مشابه
A Light-Weight Approach for Verifying Multi-Threaded Programs with CPAchecker
Verifying multi-threaded programs is becoming more and more important, because of the strong trend to increase the number of processing units per CPU socket. We introduce a new configurable program analysis for verifying multi-threaded programs with a bounded number of threads. We present a simple and yet efficient implementation as component of the existing program-verification framework CPACH...
متن کاملUsing the Karp-Miller Tree Construction to Analyse Concurrent Finite-State Programs
The formal analysis of multi-threaded programs is among the grand challenges of software verification research. In this dissertation, we consider non-recursive multi-threaded Boolean programs, the principal ingredient in predicate abstraction. We introduced a exact and complete solution for thread-state reachability analysis of concurrent Boolean programs with unbounded thread creation. We pres...
متن کاملVerifying Weak Probabilistic Noninterference
Weak probabilistic noninterference is a security property for enforcing confidentiality in multi-threaded programs. It aims to guarantee secure flow of information in the program and ensure that sensitive information does not leak to attackers. In this paper, the problem of verifying weak probabilistic noninterference by leveraging formal methods, in particular algorithmic verification, is disc...
متن کاملModular Verification of Multi-Threaded Assembly Code
Concurrency, as a useful feature of many modern programming languages and systems, is generally hard to reason about. Verification of concurrent assembly code is even harder, largely due to the lack of abstraction at the low level. In this paper, we present a certified programming framework for verifying concurrent assembly code with unbounded dynamic thread creation. We apply the rely-guarante...
متن کاملA Basis for Verifying Multi-threaded Programs
Advanced multi-threaded programs apply concurrency concepts in sophisticated ways. For instance, they use fine-grained locking to increase parallelism and change locking orders dynamically when data structures are being reorganized. This paper presents a sound and modular verification methodology that can handle advanced concurrency patterns in multi-threaded, object-based programs. The methodo...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008